<?php include load_tpl('header');?>
<p id="breadcrumbs">
    <a href="/">首页</a> <b>»</b> 
    <span>新闻列表</span>
</p>

<div class="box">
	<div class="left"></div>
	<div class="right"></div>
    <div class="heading">
      <h1 style="background-image: url('./images/review.png');">新闻列表</h1>
    </div>
    <div class="content">
	 <table class="list">
        <thead>
          <tr style="background-color: rgb(244, 244, 248);">
            <td class="left">新闻分类</td>
            <td class="left">新闻标题</td>
            <td class="right">新闻摘要</td>
            <td class="left">新闻内容</td>
            <td class="left">创建时间</td>
            <td class="right">操作</td>
          </tr>
        </thead>
        <tbody>
		<?php if($news_all){
				foreach($news_all as $news){	
		?>
           <tr>
            <td class="left"><?php echo $news['name'];?></td>
            <td class="left"><?php echo $news['title'];?></td>
            <td class="right"><?php echo $news['short_desc'];?></td>
            <td class="left"><?php echo mb_substr($news['description'],0,56);?></td>
            <td class="left"><?php echo $news['created'];?></td>
            <td class="right"><a class="button" href="index.php?mod=news&act=edit&news_id=<?php echo $news['id'];?>"><span>编辑</span></a> <a class="button" href="index.php?mod=news&act=del&news_id=<?php echo $news['id'];?>"><span>删除</span></a></td>
          </tr>
		 <?php }
		}else{
		?>

		<?php }?>
	   </tbody>
	   </table>
	 </div>
</div>
<?php include load_tpl('footer');?>